home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / Bitmap / NIH Image 1.59 / Macros / Stacks < prev    next >
Text File  |  1995-09-20  |  15KB  |  710 lines

  1. {This file contains macros that work with stacks.}
  2.  
  3. procedure CheckForStack;
  4. begin
  5.   if nPics=0 then begin
  6.     PutMessage('This macro requires a stack.');
  7.     exit;
  8.   end;
  9.   if nSlices=0 then begin
  10.     PutMessage('This window is not a stack.');
  11.     exit
  12.   end;
  13. end;
  14.  
  15.  
  16. macro 'Add Slice [A]';    begin CheckForStack; AddSlice end;
  17. macro 'Delete Slice [D]'; begin CheckForStack; DeleteSlice end;
  18. macro 'First Slice [F]';  begin CheckForStack; SelectSlice(1) end;
  19. macro 'Last Slice [L]';   begin CheckForStack; SelectSlice(nSlices) end;
  20.  
  21. macro 'Select Slice╔ [S]';
  22. var
  23.   n:integer;
  24. begin
  25.  CheckForStack;
  26.  n:=GetNumber('Slice Number:',trunc(nSlices/2));
  27.  SelectSlice(n)
  28. end;
  29.  
  30.  
  31. macro '(-' begin end;
  32.  
  33. macro 'Smooth';
  34. var
  35.   i:integer;
  36. begin
  37.   CheckForStack;
  38.   for i:= 1 to nSlices do begin
  39.     SelectSlice(i);
  40.     SetOption; Smooth;
  41.   end;
  42. end;
  43.  
  44.  
  45. macro 'Sharpen';
  46. var
  47.   i:integer;
  48. begin
  49.   CheckForStack;
  50.   for i:= 1 to nSlices do begin
  51.     SelectSlice(i);
  52.     SetOption; Smooth;
  53.     SetOption; Sharpen;
  54.   end;
  55. end;
  56.  
  57.  
  58. macro 'Reduce Noise';
  59. var
  60.   i:integer;
  61. begin
  62.   CheckForStack;
  63.   for i:= 1 to nSlices do begin
  64.     SelectSlice(i);
  65.     ReduceNoise;
  66.   end;
  67. end;
  68.  
  69.  
  70. macro 'Apply LUT';
  71. var
  72.   i,stack,slices:integer;
  73. begin
  74.   CheckForStack;
  75.   stack:=PicNumber;
  76.   slices:=nSlices;
  77.   Duplicate('Temp');
  78.   for i:= 1 to slices do begin
  79.     SelectPic(stack);
  80.     SelectSlice(i);
  81.     ApplyLut;
  82.     SelectPic(nPics);
  83.     if i<>slices then PropagateLut;
  84.   end;
  85.   SelectPic(nPics);
  86.   Dispose;
  87. end;
  88.  
  89.  
  90. macro 'Fix Colors';
  91. {
  92. Changes 0 to 1 and 255 to 254 in all slices. We want to do this because
  93. pixel values of 0(which always displays as white) and 255(always
  94. displays as black) cause problems when pseudo-coloring images.
  95. }
  96. var
  97.   i:integer;
  98. begin
  99.   CheckForStack;
  100.   for i:= 1 to nSlices do begin
  101.     SelectSlice(i);
  102.     ChangeValues(0,0,1);
  103.     ChangeValues(255,255,254);
  104.   end;
  105. end;
  106.  
  107. macro 'Subtract Background╔';
  108. var
  109.   radius,i:integer;
  110. begin
  111.   CheckForStack;
  112.   radius:=GetNumber('Rolling ball radius (pixels):',50);
  113.   for i:= 1 to nSlices do begin
  114.     SelectSlice(i);
  115.     SubtractBackground('2D Rolling Ball',radius);
  116.   end;
  117. end;
  118.  
  119.  
  120. macro '(-' begin end;
  121.  
  122.  
  123. procedure CheckForSelection;
  124. var 
  125.   x1,y1,x2,y2,LineWidth:integer;
  126. begin
  127.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  128.   GetLine(x1,y1,x2,y2,LineWidth);
  129.   if (RoiWidth=0) or (x1>=0) then begin
  130.     PutMessage('Please make a rectangular selection.');
  131.     exit;
  132.   end;
  133. end;
  134.  
  135.  
  136. procedure CropAndScale(fast:boolean; angle:real);
  137. var
  138.   i,OldStack,NewStack:integer;
  139.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  140.   N,NewWidth:integer;
  141.   ScaleFactor:real;
  142.   OneToOne:boolean;
  143. begin
  144.   CheckForStack;
  145.   CheckForSelection;
  146.   SaveState;
  147.   OldStack:=PicNumber;
  148.   N:=nSlices;
  149.   ScaleFactor:=GetNumber('Scale factor(0.05..25):',1.0);
  150.   OneToOne:=ScaleFactor=1.0;
  151.   NewWidth:=round(RoiWidth*ScaleFactor);
  152.   if odd(NewWidth) then begin
  153.     NewWidth:=NewWidth-1;
  154.     ScaleFactor:=NewWidth/RoiWidth;
  155.   end;
  156.   SetNewSize(RoiWidth*ScaleFactor,RoiHeight*ScaleFactor);
  157.   MakeNewStack('Stack');
  158.   NewStack:=PicNumber;
  159.   if not OneToOne then begin
  160.     if fast 
  161.       then SetScaling('Nearest; Create New Window')
  162.       else SetScaling('Bilinear; Create New Window');
  163.   end;
  164.   SelectPic(OldStack);
  165.   for i:= 1 to N do begin
  166.     SelectSlice(1);
  167.     if OneToOne and (angle=0.0) then Duplicate('Temp')
  168.       else ScaleAndRotate(ScaleFactor,ScaleFactor,angle);
  169.     SelectAll;
  170.     Copy;
  171.     SelectPic(NewStack);
  172.     if i<>1 then AddSlice;
  173.     Paste;
  174.     SelectPic(nPics);
  175.     Dispose; {Temp}
  176.     SelectPic(OldStack);
  177.     DeleteSlice;
  178.   end;
  179.   Dispose; {OldStack}
  180.   RestoreState;
  181. end;
  182.  
  183. macro 'Crop and Scale-Fast╔';   begin CropAndScale(true, 0); end;
  184. macro 'Crop and Scale-Smooth╔'; begin CropAndScale(false, 0); end;
  185.  
  186. procedure Rotate(left:boolean);
  187. var
  188.   i,OldStack,NewStack:integer;
  189.   RoiLeft,RoiTop,RoiWidth,RoiHeight:integer;
  190.   N,NewWidth:integer;
  191.   ScaleFactor,SliceSpacing:real;
  192.   OneToOne:boolean;
  193. begin
  194.   CheckForStack;
  195.   SelectAll;
  196.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  197.   OldStack:=PicNumber;
  198.   SliceSpacing:=GetSliceSpacing;
  199.   N:=nSlices;
  200.   SetNewSize(RoiHeight,RoiWidth);
  201.   MakeNewStack('Stack');
  202.   if SliceSpacing>0 then SetSliceSpacing(SliceSpacing);
  203.   NewStack:=PicNumber;
  204.   SelectPic(OldStack);
  205.   for i:= 1 to N do begin
  206.     SelectSlice(1);
  207.     if left
  208.       then RotateLeft(true)
  209.       else RotateRight(true);
  210.     SelectAll;
  211.     Copy;
  212.     SelectPic(NewStack);
  213.     if i<>1 then AddSlice;
  214.     Paste;
  215.     ChoosePic(nPics);
  216.     Dispose;
  217.     SelectPic(OldStack);
  218.     DeleteSlice;
  219.   end;
  220.   Dispose;
  221. end;
  222.  
  223.  
  224. macro 'Rotate Left';  begin rotate(true) end;
  225. macro 'Rotate Right'; begin rotate(false) end;
  226.  
  227.  
  228. macro 'Rotate╔';
  229. var
  230.   angle:real;
  231. begin
  232.   angle:=GetNumber('Angle(-180.0í..180.0í):',45.0);
  233.   CropAndScale(false, angle);
  234. end;
  235.  
  236.  
  237. macro 'Invert';
  238. var
  239.   i:integer;
  240. begin
  241.   CheckForStack;
  242.   for i:= 1 to nSlices do begin
  243.     SelectSlice(i);
  244.     Invert;
  245.   end;
  246. end;
  247.  
  248.  
  249. procedure flip(vertical:boolean);
  250. var
  251.   i:integer;
  252.   SliceSpacing:real;
  253. begin
  254.   CheckForStack;
  255.   for i:= 1 to nSlices do begin
  256.     SelectSlice(i);
  257.     if vertical
  258.       then FlipVertical
  259.       else FlipHorizontal;
  260.   end;
  261. end;
  262.  
  263. macro 'Flip Vertical';   begin flip(true) end;
  264. macro 'Flip Horizontal'; begin flip(false) end;
  265.  
  266.  
  267. macro 'Delete Even Slices';
  268. var
  269.   n:integer;
  270. begin
  271.   CheckForStack;
  272.   SelectSlice(2);
  273.   repeat
  274.     DeleteSlice;
  275.     n:=SliceNumber;
  276.     n:=n+2;
  277.     if n>nSlices then exit;
  278.     SelectSlice(n);
  279.    until false;
  280. end;
  281.  
  282.  
  283. macro 'Replicate Slices╔';
  284. var
  285.   n,i,RepFactor:integer;
  286. begin
  287.   CheckForStack;
  288.   RepFactor:=GetNumber('Replication factor(2,3,4,5,etc):',2);
  289.   n:=nSlices;
  290.   repeat
  291.     SelectSlice(n);
  292.     SelectAll;
  293.     Copy;
  294.     for i:=2 to RepFactor do begin
  295.       AddSlice;
  296.       Paste;
  297.     end;
  298.     n:=n-1;
  299.    until n=0;
  300.    KillRoi;
  301. end;
  302.  
  303.  
  304. macro 'Merge Two Stacks';
  305. {
  306. Combines two stacks(w1xh1xd1 and w2xh2xd2) to create a new
  307. w1+w2 x max(h1,h2) x max(d1,d2) stack. For example, a 256x256x40
  308. and a 256x256x30 stack would be combined into one 512x256x40 stack.
  309. }
  310. var
  311.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3:integer;
  312. begin
  313.   SaveState;
  314.   if nPics<>2 then begin
  315.     PutMessage('This macro operates on exactly two stacks.');
  316.     exit;
  317.   end;
  318.   SelectPic(1);
  319.   GetPicSize(w1,h1);
  320.   d1:=nSlices;
  321.   SelectPic(2);
  322.   GetPicSize(w2,h2);
  323.   d2:=nSlices;
  324.   if d1>=d2
  325.     then d3:=d1
  326.     else d3:=d2;
  327.   if d3=0 then begin
  328.     PutMessage('Both images must be stacks.');
  329.     exit;
  330.   end;
  331.   w3:=w1+w2;
  332.   if h1>=h2
  333.     then h3:=h1
  334.     else h3:=h2;
  335.   SetNewSize(w3,h3);
  336.   MakeNewStack('Merged');
  337.   for i:=1 to d3 do begin
  338.     SelectPic(1);
  339.     SelectSlice(1);
  340.     SelectAll;
  341.     Copy;
  342.     DeleteSlice;
  343.     SelectPic(3);
  344.     MakeRoi(0,0,w1,h1);
  345.     Paste;
  346.     SelectPic(2);
  347.     SelectSlice(1);
  348.     SelectAll;
  349.     Copy;
  350.     DeleteSlice;
  351.     SelectPic(3);
  352.     MakeRoi(w1,0,w2,h2);
  353.     Paste;
  354.     if i<d3 then AddSlice;
  355.   end;
  356.   SelectPic(1);
  357.   Dispose;
  358.   SelectPic(1);
  359.   Dispose;
  360.   RestoreState;
  361. end;
  362.  
  363.  
  364. macro 'Average Two Stacks';
  365. {Creates the frame by frame average of two stacks.}
  366. var
  367.   i,w1,w2,w3,h1,h2,h3,d1,d2,d3,avg:integer;
  368. begin
  369.   RequiresVersion(1.53);
  370.   SaveState;
  371.   if nPics<>2 then begin
  372.     PutMessage('This macro operates on exactly two stacks.');
  373.     exit;
  374.   end;
  375.   SelectPic(1);
  376.   KillRoi;
  377.   GetPicSize(w1,h1);
  378.   d1:=nSlices;
  379.   SelectPic(2);
  380.   KillRoi;
  381.   GetPicSize(w2,h2);
  382.   d2:=nSlices;
  383.   if d1>=d2
  384.     then d3:=d1
  385.     else d3:=d2;
  386.   if (w1<>w2) or (h1<>h2) or (d1<>d2) or (d1=0)  then begin
  387.     PutMessage('This macro requires two stacks that are the same size.');
  388.     exit;
  389.   end;
  390.   SetNewSize(w1,h1);
  391.   MakeNewStack('Average');
  392.   avg:=PicNumber;
  393.   for i:=1 to d1 do begin
  394.     SelectPic(1);
  395.     SelectSlice(i);
  396.     SelectPic(2);
  397.     SelectSlice(i);
  398.    ImageMath('Add', 1, 2, 0.5, 0, 'Temp');
  399.     SelectAll;
  400.     Copy;
  401.     dispose;
  402.     SelectPic(avg);
  403.     if i<>1 then AddSlice;
  404.     paste;
  405.    end;
  406.   RestoreState;
  407. end;
  408.  
  409.  
  410. macro '(-' begin end;
  411.  
  412.  
  413. macro 'Save Slices as files╔';
  414. {
  415. This macro saves the slices in a stack as individual TIFF or PICT files using
  416. names of the form needed by Apple's Convert to [QuickTime]Movie utility.
  417. To specify the file type, checked either TIFF or PICT in the SaveAs dialog
  418. box, which should only appear once.
  419. }
  420. var
  421.   i,stack:integer;
  422. begin
  423.   CheckForStack;
  424.   stack:=PidNumber;
  425.   for i:= 1 to nSlices do begin
  426.     SelectPic(stack);
  427.     SelectSlice(i);
  428.     Duplicate('Frame.',i:3);
  429.     SaveAs;
  430.     {Export;}
  431.     Dispose;
  432.   end;
  433. end;
  434.  
  435.  
  436. macro 'Windows to Stack';
  437. {Unlike the menu command of the same name, the windows do not}
  438. {all need to be the same size.}
  439. var
  440.   i,width,height,MinWidth,MinHeight,n,stack:integer;
  441.   isStack:boolean;
  442. begin
  443.   if nPics<=1 then begin
  444.     PutMessage('At least two images must be open.');
  445.     exit;
  446.   end;
  447.   MinWidth:=9999;
  448.   MinHeight:=9999;
  449.   isStack:=false;
  450.   for i:=1 to nPics do begin
  451.     SelectPic(i);
  452.     GetPicSize(width,height);
  453.     if width<MinWidth then MinWidth:=width;
  454.     if height<MinHeight then MinHeight:=height;
  455.     isStack:=isStack or (nSlices>0);
  456.   end;
  457.   if isStack then begin
  458.     PutMessage('This macro does not work with stacks.');
  459.     exit;
  460.   end;
  461.   if odd(MinWidth) then MinWidth:=MinWidth-1;
  462.   n:=nPics;
  463.   SaveState;
  464.   SetNewSize(MinWidth,MinHeight);
  465.   MakeNewStack('Stack');
  466.   stack:=nPics;
  467.   for i:=1 to n do begin
  468.     SelectPic(1);
  469.     MakeRoi(0,0,MinWidth,MinHeight);
  470.     copy;
  471.     Dispose;
  472.     SelectPic(nPics);
  473.     paste;
  474.     if i<>n then AddSlice;
  475.   end;
  476.   KillRoi;
  477.   RestoreState;
  478. end;
  479.  
  480.  
  481. Macro 'Stack to Windows'
  482. var
  483.   mystack,i:integer
  484.   width,height:integer;
  485. begin
  486.   SaveState;
  487.   CheckForStack;
  488.   GetPicSize(width,height);
  489.   SetNewSize(width,height);
  490.   mystack := picnumber;
  491.   for i:=1 to nslices do begin
  492.     SelectSlice(i);
  493.     SelectAll;
  494.     copy;
  495.     MakeNewWindow(i);
  496.     paste;
  497.     SelectPic(myStack);
  498.   end;
  499.   KillRoi;
  500.   RestoreState;
  501. end;
  502.  
  503.  
  504. macro 'Make Cone';
  505. var
  506.   i,size,margin,MaxRadius,r,r2,center,RodLength,color:integer;
  507. begin
  508.   size:=64;
  509.   margin:=5;
  510.   color:=100;
  511.   SaveState;
  512.   SetBackgroundColor(255); {Black}
  513.   SetNewSize(size,size);
  514.   MakeNewStack('Cone');
  515.   for i:=1 to margin do AddSlice;
  516.   MaxRadius:=(size-2*margin)/2;
  517.   center:=size div 2;
  518.   RodLength:=size-2*margin-1;
  519.   for i:=1 to RodLength do begin
  520.     AddSlice;
  521.     r:=MaxRadius*(i/RodLength);
  522.     MakeOvalRoi(center-r,center-r,r*2,r*2);
  523.     SetForegroundColor(color);
  524.     Fill;
  525.     if (i>RodLength/2) and (i<(RodLength-margin)) then begin
  526.       r2:=MaxRadius/6;
  527.       MakeOvalRoi(center-2.125*r2,center-1.3*r2,r2*2,r2*2);
  528.       SetForegroundColor(color-25);
  529.       Fill;
  530.       MakeOvalRoi(center+0.625*r2,center-0.7*r2,r2*2,r2*2);
  531.       SetForegroundColor(color+25);
  532.       Fill;
  533.     end;
  534.   end;
  535.   for i:=1 to margin do AddSlice;
  536.   KillRoi;
  537.   RestoreState;
  538. end;
  539.  
  540.  
  541. procedure DoReslicing(horizontal:boolean);
  542. var
  543.   stack1,stack2,width,height:integer;
  544.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  545.   InputSpacing,OutputSpacing,loc:real;
  546.   FirstTime:boolean;
  547. begin
  548.   RequiresVersion(1.45);
  549.   CheckForStack;
  550.   CheckForSelection;
  551.   SaveState;
  552.   SetBackground(0);
  553.   SetBackground(255);
  554.   stack1:=PicNumber;
  555.   InputSpacing:=GetSliceSpacing;
  556.   if InputSpacing<=0 then InputSpacing:=1;
  557.   InputSpacing:=GetNumber('Input Slice Spacing(Pixels):',InputSpacing);
  558.   SetSliceSpacing(InputSpacing);
  559.   OutputSpacing:=InputSpacing;
  560.   OutputSpacing:=GetNumber('Output Slice Spacing (Pixels):', OutputSpacing);
  561.   FirstTime:=true;
  562.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  563.   if horizontal then begin
  564.     loc:=RoiTop+OutputSpacing;
  565.     max:=RoiTop+RoiHeight;
  566.   end else begin
  567.     loc:=RoiLeft+OutputSpacing;
  568.     max:=RoiLeft+RoiWidth;
  569.   end;
  570.   while loc<max do begin
  571.     ChoosePic(stack1);
  572.     if horizontal
  573.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  574.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiHeight);
  575.     Reslice;
  576.     SelectAll;
  577.     Copy;
  578.     GetPicSize(width,height);
  579.     Dispose;
  580.     if FirstTime then begin
  581.       SetNewSize(width,height);
  582.       MakeNewStack(OutputSpacing:1:2);
  583.       SetSliceSpacing(OutputSpacing);
  584.       stack2:=PicNumber;
  585.     end;
  586.     ChoosePic(stack2);
  587.     if not FirstTime then AddSlice;
  588.     Paste;
  589.     loc:=loc+OutputSpacing;
  590.     FirstTime:=false;
  591.   end;
  592.   SelectPic(stack1);
  593.   KillRoi;
  594.   SelectPic(stack2);
  595.   KillRoi;
  596.   RestoreState;
  597. end;
  598.  
  599.  
  600. macro 'Reslice Horizontally╔'; begin DoReslicing(true) end;
  601. macro 'Reslice Vertically╔';   begin DoReslicing(false) end;
  602.  
  603.  
  604. macro '(-' begin end;
  605.  
  606.  
  607. procedure ResliceSignaMRI(horizontal,OptionKey:boolean);
  608. var
  609.   stack1,stack2,width,height:integer;
  610.   RoiLeft,RoiTop,RoiWidth,RoiHeight,max:integer;
  611.   loc,PixelSpacing:real;
  612.   InputSpacing,OutputSpacing:real; {mm}
  613.   scale:real; {pixels/mm}  
  614.   FirstTime:boolean;
  615. begin
  616.   scale:=1.0666; {Assumes 256x256 slices and 240mm field of view}
  617.   RequiresVersion(1.45);
  618.   CheckForStack;
  619.   CheckForSelection;
  620.   SaveState;
  621.   SetScale(scale,'mm');
  622.   SetBackground(0);
  623.   SetBackground(255);
  624.   stack1:=PicNumber;
  625.   InputSpacing:=GetSliceSpacing/scale;
  626.   if InputSpacing<=0 then InputSpacing:=1.5;
  627.   InputSpacing:=GetNumber('Input Slice Spacing(mm):',InputSpacing);
  628.   SetSliceSpacing(InputSpacing*scale);
  629.   OutputSpacing:=InputSpacing;
  630.   OutputSpacing:=GetNumber('Output Slice Spacing (mm):', OutputSpacing);
  631.   PixelSpacing:=OutputSpacing*scale;
  632.   FirstTime:=true;
  633.   GetRoi(RoiLeft,RoiTop,RoiWidth,RoiHeight);
  634.   if horizontal then begin
  635.     loc:=RoiTop+PixelSpacing;
  636.     max:=RoiTop+RoiHeight;
  637.   end else begin
  638.     loc:=RoiLeft+PixelSpacing;
  639.     max:=RoiLeft+RoiWidth;
  640.   end;
  641.   while loc<max do begin
  642.     ChoosePic(stack1);
  643.     if horizontal
  644.       then MakeLineRoi(RoiLeft,loc,RoiLeft+RoiWidth,loc)
  645.       else MakeLineRoi(loc,RoiTop,loc,RoiTop+RoiTop+RoiHeight);
  646.     if OptionKey then SetOption;
  647.     Reslice;
  648.     SelectAll;
  649.     Copy;
  650.     GetPicSize(width,height);
  651.     Dispose;
  652.     if FirstTime then begin
  653.       SetNewSize(width,height);
  654.       MakeNewStack(OutputSpacing:1:2);
  655.       SetSliceSpacing(PixelSpacing);
  656.       stack2:=PicNumber;
  657.     end;
  658.     ChoosePic(stack2);
  659.     if not FirstTime then AddSlice;
  660.     Paste;
  661.     loc:=loc+PixelSpacing;
  662.     FirstTime:=false;
  663.   end;
  664.   SelectPic(stack1);
  665.   KillRoi;
  666.   SelectPic(stack2);
  667.   KillRoi;
  668.   RestoreState;
  669. end;
  670.  
  671.  
  672. macro 'Import GE Signa Files╔';
  673. Var
  674.   i,n,max,stack,first:integer;
  675.   scale:real; {pixels/mm}
  676. begin
  677.   scale:=256 / 240; {assumes 256x256 slices with 240mm field of view}
  678.   first:=round(GetNumber('Number of first slice:',1));
  679.   max:=round(GetNumber('Maximum pixel value:',255));
  680.   SetNewSize(256,256);
  681.   MakeNewStack('Stack');
  682.   stack:=nPics;
  683.   MoveWindow(340,40);
  684.   SetScale(scale,'mm');
  685.   SetCustom(256,256,14336);
  686.   SetImport('Custom; 16-bits Signed; Fixed Scale');
  687.   SetImportMinMax(0,max);
  688.   n:=first;
  689.   for i:=1 to 256 do begin
  690.     Import('i.',n:3);
  691.     SetPicName('i.',n:3);
  692.     SelectAll;
  693.     Copy;
  694.     Dispose;
  695.     SelectPic(stack);
  696.     if n<>first then AddSlice;
  697.     n:=n+1;
  698.     Paste;
  699.    end;
  700. end;
  701.  
  702.  
  703. macro 'Sagitals to Coronals╔'; begin ResliceSignaMRI(false,true) end;
  704.  
  705. macro 'Sagitals to Axials╔'; begin ResliceSignaMRI(true,true) end;
  706.  
  707. macro 'Coronals to Sagitals╔'; begin ResliceSignaMRI(false,true) end;
  708.  
  709.  
  710.